var t = (0, require("../../../@babel/runtime/helpers/interopRequireDefault").default)(require("../../../utils/util"));
Page({
  data: {
    nowtime: t.default.formatDate(new Date),
    preventTouchMove: function (t) {},
    shows: !1,
    currentDate: (new Date).getTime(),
    minDate: new Date(2022, 0, 1).getTime(),
    formatter: function (t, e) {
      return "year" === t ? "".concat(e, "年") : "month" === t ? "".concat(e, "月") : e
    },
    tzsj: "退租时间"
  },
  onLoad: function (t) {
    wx.setNavigationBarTitle({
        title: t.address
      }),
      this.setData({
        name: t.title,
        qymc: t.qymc
      }),
      "true" == t.show ? this.setData({
        list: !0,
        title: "场地租赁"
      }) : this.setData({
        list: !1,
        title: "退租"
      })
  },
  onCancels: function () {
    this.setData({
      shows: !1
    })
  },
  onConfirms: function (e) {
    var a = t.default.formatStamp(e.detail);
    this.setData({
      shows: !1,
      tzsj: a
    })
  },
  getName: function (t) {
    this.setData({
      inputname: t.detail.value
    })
  },
  getNumber: function (t) {
    this.setData({
      phone: t.detail.value
    })
  },
  showClick: function () {
    this.setData({
      shows: !0
    })
  },
  getArea: function (t) {
    this.setData({
      area: t.detail.value
    })
  },
  getNotes: function (t) {
    this.setData({
      notes: t.detail.value
    })
  },
  apply: function () {
    null == this.data.inputname ? wx.showToast({
      title: "请填写姓名",
      icon: "none",
      duration: 1e3
    }) : /^1[3456789]\d{9}$/.test(this.data.phone) ? wx.navigateTo({
      url: "/pages/employ/success/success?name=" + this.data.title + "&type=" + this.data.phone + "&time=" + this.data.nowtime
    }) : wx.showToast({
      title: "手机号格式不正确",
      icon: "none",
      duration: 1e3
    })
  }
});